package com.ktwlrj.core.config.properties;

import lombok.Getter;
import lombok.Setter;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.core.io.Resource;
import org.springframework.stereotype.Component;

import java.util.Map;
import java.util.Set;

/**
 * 应用基础配置信息
 *
 * @author zhouxuanhong
 * @date 2019-05-10 14:23
 * @since JDK1.8
 */
@Getter
@Setter
@Component
@ConfigurationProperties(prefix = "app")
public class AppProperty {
    private String serverPort;
    private int expirePicture;
    private int expireToken;
    private String tokenStore;
    private String codeStore;
    private int expireCode;
    private String logRootLevel;
    private String logPackageLevel;
    @Value("${spring.profiles.active}")
    private String active;
    @Value(value = "classpath:application-${spring.profiles.active}.yml")
    private Resource resource;
    @Value(value = "${server.servlet.context-path}")
    private String contextPath;
    @Value("${spring.application.version}")
    private String version;
    private int pictureCodeNum;
    private String dataStrategy;
    private boolean openSmsCode;
    private boolean createOutConf;
    private String generalSmsCode;
    private String importTempPath = "./templ";
    private boolean openAuth;
    private Set<String> whiteAuthList;
    private String oauthSuccessRedirectUrl;
    private String oauthFailRedirectUrl;
    private Map<String, String> archiveType;

    private String smsChannel;
    private String smsEncoded;
}